/*
 * @Author: zhangweinan
 * @Date: 2022-11-25 14:12:26
 * @LastEditors: zhangweinan
 * @LastEditTime: 2023-05-24 16:04:37
 * @Description: file content
 * @FilePath: \front-end-of-task-center\src\api\enterprise\info.js
 */
import request from "@/utils/request";

// 获取企业token
export function getEnterpriseTokenByUserInfo(data) {
  return request({
    url: `/enterprise-do/getEnterpriseTokenByUserInfo/${data}`,
    method: "post",
  });
}

// 获取企业信息列表
export function getEnterpriseList(params) {
  return request({
    url: `/enterprise-do/list`,
    method: "get",
    params,
  });
}

// 创建企业基本信息
export function createEnterpriseInfo(data) {
  return request({
    url: `/enterprise-do/create`,
    method: "post",
    data,
  });
}

// 删除企业基本信息
export function deleteEnterpriseInfo(id) {
  return request({
    url: `/enterprise-do/delete?id=` + id,
    method: "delete",
  });
}

// 创建企业基本信息
export function updateEnterpriseInfo(data) {
  return request({
    url: `/enterprise-do/update`,
    method: "put",
    data,
  });
}

// 获取通知详情
export function getNoticeDetail(params) {
  return request({
    url: "/enterprise-do/get",
    method: "get",
    params,
  });
}

// 获取通知流程列表
export function getNoticeProcessList(enterpriseId) {
  return request({
    url: `/enterprise-do/getNoticeSonList/${enterpriseId}`,
    method: "get",
  });
}

// 删除通知流程列表
export function deleteNoticeProcess(id) {
  return request({
    url: `/enterprise-do/deleteNoticeSon/${id}`,
    method: "delete",
  });
}
//获取处室数据
export function getOfficeQueryPage(data) {
  return request({
    url: `/tOffice/queryPage`,
    method: "post",
    data
  });
}
//新增处室
export function addOffice(data) {
  return request({
    url: `/tOffice/add`,
    method: "post",
    data
  });
}
//处室删除
export function deleteOffice(data) {
  return request({
    url: `/tOffice/deleteBatch`,
    method: "post",
    data
  });
}
//修改处室名称
export function editOffice(data) {
  return request({
    url: `/tOffice/edit`,
    method: "post",
    data
  });
}
//事项的批量移动
export function batchEditByOfficeId(data) {
  return request({
    url: `/enterprise-do/batchEditByOfficeId`,
    method: "post",
    data
  });
}


